package dt.tradeAction;

import java.io.IOException;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;

import org.apache.jasper.tagplugins.jstl.core.ForEach;

import com.ibatis.sqlmap.client.SqlMapClient;


public class RatesUpdate  {
	
	private static RatesVO paramClass;
	
	public static void main(String ar[]) throws IOException{
		
		SqlMapClient sqlMap = RatesSqlMapConfig.getSqlMapInstance();
		
		paramClass = new RatesVO();
		
		
		
		paramClass.setNational("jpy");
		paramClass.setRates(1700);
		
		System.out.println(sqlMap);
		
		for(int i = 0; i <= 100; i++){
			
			try {
				System.out.println(i);
				Thread.sleep(1000);
			} catch (InterruptedException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}
		
		
		try {
			sqlMap.update("ratesUpdate.updateRates", paramClass);
			System.out.println("udadate Success");
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	
	}
	

}
